Dynomotion

Group: DynoMotion Message: 6983 From: funncarsmi Date: 3/13/2013
Subject: start up threads
First, the pull up resistors worked great! The encoders are counting perfectly.
I can control the Kflop digital I/O bits 16 to 25 from the console.
The drives run and track fairly well but need to be fine tuned.

Two big issues remain:
1) startup initialization of the machine.
Right now the system starts but the digital I/O is defaulted to off and that means it is trying to run the spindle CW, CCW and stop it -ALL AT THE SAME TIME. I can pull the cable, set the bits from the console, reconnect the cable and run. But lets face it, it should be possible to run that at startup, but where and how? I have written a init.c program, assigned it a name. I have no idea what folder to save it to nor how to make a call to either load it onto the kflop board or from kmotion. I grew up on DOS, I expect there to be a batch file or a set of files that I specify it to run. Where is this and how do I do it?

2)Fine tuning of the drives
PID parameters
Velocity, accel and jerk When to adjust each parameter and in what magnitude.
Please provide a guide regarding how to fine tune these 6 parameters (P, I, D, Velocity, Accel, Jerk)

Once I get these little details figured out, the system should be making chips this weekend.

Gregg
Group: DynoMotion Message: 6985 From: Tom Kerekes Date: 3/13/2013
Subject: Re: start up threads
Hi Gregg,

Regarding:

#1 - You must design your system so everything stays off after power up until the Operator initializes the system.  A Windows batch file or something similar wouldn't help because the PC might not be even turned on or booted yet.  You didn't explain which IOs you are connected to or how.  Unfortunately the Kanalog Outputs all come up in a random state (sorry about that) except the SWE relay output.  The SWE relay driver output is guaranteed to remain off on power up until all the IO on Kanalog is initialized off.  Then SWE will then turn on.  This means that for about 4 seconds on power up some of the the Kanalog IO might be on.  One solution is to have a master relay that needs both SWE and some other output bit to turn on main power.  That way power will remain off for the 4 seconds while KFLOP is booting and then continue to remain off afterward.  Finally when the Operator Initializes the System your Initialization C program can enable things in whatever order makes sense for your system.

Another approach would be to use a KFLOP Output as a master enable.  Most KFLOP IO comes up as Inputs (floating) and will remain floating until your Initialization program configures them as outputs and sets or clears them.  Please realize that floating could be high or low voltage levels unless pulled up or down with a pullup or pull down resistor.  The first 8 IO on JP4 and JP6 have pull down resistors.  In those cases the level will be guaranteed until explicitly changed.

You can save the Initialization C program wherever you wish.  I'd recommend making a special folder outside of the KMotion Installed directory.  Then configure Mach3 or KMotionCNC to use it.

#2 - Please read the documentation and read some of the Tuning threads here and on cnczone.com.  Then ask specific questions.  The Velocity, Acceleration, and Jerk relate to how the motion trajectory is made.  The PID parameters relate to how the servo makes corrections to deviations from the ideal trajectory. 

HTH
Regards
TK